﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace ZhaoPin.Feature
{
    public partial class ShowPhoto : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RecruitContainer rc = new RecruitContainer();
            Guid guid = (Guid)Membership.GetUser().ProviderUserKey;
            var photo = from p in rc.People where p.Id.Equals(guid) select p.Photo;
            Photo temp = photo.Single();
            if (temp.Image != null)
            {
                Response.ContentType = temp.ContentType;
                Response.BinaryWrite(temp.Image);
            }
            Response.End();
        }
    }
}